<template>
  <div :render="render" :row="row" :index="index" :column="column"></div>
</template>
<script lang="ts">
export default {
  name: 'TableSlotComponent',
  props: {
    row: Object,
    render: Function,
    index: Number,
    column: {
      type: Object,
      default: null
    }
  },
  setup(props) {
    return () => {
      const params = {
        row: props.row,
        index: props.index,
        column: {}
      };
      if (props.column) params.column = props.column;
      return props.render ? props.render(params) : null
    };
  }
};
</script>
